home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / t_unix / j109lxa4.tar / internet.h < prev    next >
C/C++ Source or Header  |  1994-06-04  |  2KB  |  68 lines

  1. /* Mods by PA0GRI */
  2. #ifndef    _INTERNET_H
  3. #define    _INTERNET_H
  4.  
  5. #ifndef    _GLOBAL_H
  6. #include "global.h"
  7. #endif
  8.  
  9. /* Global structures and constants pertaining to the interface between IP and
  10.  *     higher level protocols
  11.  */
  12.  
  13. /* IP protocol field values */
  14. #define    ICMP_PTCL    1    /* Internet Control Message Protocol */
  15. #define    TCP_PTCL    6    /* Transmission Control Protocol */
  16. #define    UDP_PTCL    17    /* User Datagram Protocol */
  17. #define    RSPF_PTCL    73    /* Radio Shortest Path First Protocol */
  18. #define    AX25_PTCL    93    /* AX25 inside IP according to RFC-1226 */
  19. #define    IP_PTCL        94    /* IP inside IP */
  20.  
  21. #define    MAXTTL        255    /* Maximum possible IP time-to-live value */
  22.  
  23. /* DoD-style precedences */
  24. #define    ROUTINE        0x00
  25. #define    PRIORITY    0x20
  26. #define    IMMEDIATE    0x40
  27. #define    FLASH        0x60
  28. #define    FLASH_OVER    0x80
  29. #define    CRITIC        0xa0
  30. #define    INET_CTL    0xc0
  31. #define    NET_CTL        0xe0
  32.  
  33. /* Amateur-style precedences */
  34. #define    AM_ROUTINE    0x00
  35. #define    AM_WELFARE    0x20
  36. #define    AM_PRIORITY    0x40
  37. #define    AM_EMERGENCY    0x60
  38.  
  39. /* Class-of-service bits */
  40. #define    LOW_DELAY    0x10
  41. #define    THROUGHPUT    0x08
  42. #define    RELIABILITY    0x04
  43.  
  44. /* IP TOS fields */
  45. #define    PREC(x)        (((x)>>5) & 0x7)
  46. #define    DELAY        0x10
  47. #define    THRUPUT        0x8
  48. #define    RELIABLITY    0x4
  49.  
  50. /* Pseudo-header for TCP and UDP checksumming */
  51. struct pseudo_header {
  52.     int32 source;        /* IP source */
  53.     int32 dest;        /* IP destination */
  54.     char protocol;        /* Protocol */
  55.     int16 length;        /* Data field length */
  56. };
  57. #define    NULLHEADER    (struct pseudo_header *)0
  58.  
  59. /* Format of a MIB entry for statistics gathering */
  60. struct mib_entry {
  61.     char *name;
  62.     struct {
  63.         int32 integer;
  64.     } value;
  65. };
  66.  
  67. #endif    /* _INTERNET_H */
  68.